package com.xy.test.service.impl;
import com.xy.test.mapper.StockMapper;
import com.xy.test.service.StockService;
import io.seata.core.context.RootContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StockServiceImpl implements StockService {

    @Autowired
    private StockMapper stockMapper;

    public void desc(Integer productId) {
        System.out.println("seata全局事务id====================>"+ RootContext.getXID());
        System.out.println("stock 接收到："+productId);
        stockMapper.stockDesc(productId);
    }

}